Method and apparatus for filtering an image

ABSTRACT

Objects are detected in an image using a spatially variant filter. The size of the filter is adjusted based on the portion of the image being processed by the filter. Portions of the image which are closer to an imaging device which captured the image are processed using a larger size filter. Portions of the image which are farther from the imaging device are processed using a smaller size filter.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No. 10/444,125, filed May 23, 2003, the disclosure of which is incorporated herein by reference in its entirety.

FIELD OF THE INVENTION

The present invention relates to processing of image data. More particularly, the present invention relates to a method and apparatus for spatially filtering an image, wherein the filter size is adjusted based on which portion of the image is being processed.

BACKGROUND OF THE INVENTION

Historically, reconnaissance information has provided important information used in planning military operations. For example, prior to the advent of photography, scouts would be sent out to collect information regarding natural resources such as lakes and rivers, enemy troop information and the like. With the advent of photography, these scouts would provide reconnaissance information by capturing a scene of enemy installations, battlefields, and the like, using photographs. As technology advances, new methods are provided for collecting reconnaissance information. For example, it is quite common today to have reconnaissance planes, manned or remotely controlled, or satellites capture a scene for reconnaissance purposes. In addition to conventional photographic techniques, a scene can be captured using infrared detectors and the like.

Typically scenes captured by reconnaissance techniques have been analyzed by humans in order to determine the content of the captured scene. For example, a human would analyze a photograph to determine the location of bodies of water, the location of enemy troops and the location of man-made objects such as buildings and lines of communication. The human who analyzed the photograph would then have to relay the determined information to people in the field, for example, to an airplane pilot in order to identify targets. However, using humans to analyze photographs is very labor intensive. Further, there can be a considerable delay between the time when a scene is captured and the time in which the information in the captured scene is relayed to persons in the field.

Moreover, a person who receives a captured scene may not have the time to analyze it. For example, in a single seat aircraft scenes captured by sensors on the aircraft can be provided directly to the pilot. However, in addition to analyzing a scene, the pilot also has to fly the aircraft.

Accordingly, it would be desirable to automate the analysis of images. Further, it would be desirable to provide mechanisms for determining whether the automated analysis is producing accurate results.

SUMMARY OF THE INVENTION

In accordance with one embodiment of the present invention, a method and apparatus for detecting objects in an image are provided. The image is processed using a filter to produce a filtered image. The size of the filter varies in dependence upon a portion of the image being processed. The filtered image is employed for detecting objects.

In accordance with another aspect of the present invention, a method and apparatus are provided for detecting objects in an image. An image and a distance range are received. A filter size is set based on the image range and objects to be detected. The image is spatially filtered with a spatially variant filter which varies the filter size based on a portion of the image being processed. Features are extracted from the image using local maxima of the spatially filtered image. Objects are detected based on the extracted features.

BRIEF DESCRIPTION OF THE DRAWING FIGURES

Other objects and advantages of the invention will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments, in conjunction with the accompanying drawings, wherein like reference numerals have been used to designate like elements, and wherein:

FIG. 1 is a block diagram of an exemplary automatic target detection system which employs the spatial filter of the present invention.

FIG. 2 illustrates an exemplary difference of Gaussian's filter in accordance with exemplary embodiments of the present invention.

FIG. 3A illustrates the response of a conventional difference of Gaussian filter.

FIG. 3B illustrates the response of the difference of Gaussian filter in accordance with exemplary embodiments of the present invention.

FIG. 4 illustrates an exemplary method for spatially filtering an image in accordance with the present invention.

FIG. 5 illustrates an exemplary image upon which spatial filtering can be performed in accordance with exemplary embodiments of the present invention.

FIG. 6 illustrates the image of FIG. 5 after spatial filtering in accordance with exemplary embodiments of the present invention.

FIG. 7 illustrates the detection of objects in the image of FIG. 5 in accordance with exemplary embodiments of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 1 is a block diagram of an exemplary automatic target detection system in which the present invention can be implemented. An input image is received by the system and is provided to prefilter 120. Prefilter 120 produces a gradient magnitude image by employing a Sobel or Gabor operator. The operation and use of a Sobel or Gabor operator for image processing is well known in the art, and hence, a detailed description of such is omitted. The gradient magnitude image output by prefilter processing block 120 is provided to spatial filter 130.

In accordance with exemplary embodiments of the present invention, spatial filter 130 performs a difference of Gaussians filtering of the gradient magnitude image. Specifically, the spatial filter receives an input of the range of distances from the imaging device which captured the image to the top of the image and the bottom of the image, and a corresponding filter size range. As will be described in more detail below, the size of the spatial filter employed by the present invention is varied based upon the distance between the imaging device which captured the image and a particular point in the image. The distance range can be based upon measurements by a sensor associated with the imaging device using radar or laser. Alternatively, the distance range can be based on a flat earth assumption. The distance range and filter size range can be provided by a map or from a track file associated with the imaging device. The spatially filtered image output from processing block 130 is provided to feature extraction block 140 for extracting various features from the image. As illustrated in FIG. 1, the feature extraction block also receives the distance range and filter size ranges to assist in the feature extraction. The feature extracted image is provided to object discrimination processing block 150 for detecting objects in the image. Object detection generally involves discriminating between objects of interest and clutter in an image. Object discrimination processing block 150 outputs the top N objects detected in the image, as well as the objects pixel coordinates, a confidence value, features and chips. An image chip is a rectangular window centered around an object location which is large enough to encompass the object. Features are numerical values extracted from a chip, the higher the value the more likely the chip contains an object.

FIG. 2 illustrates an exemplary spatial filter in accordance with exemplary embodiments of the present invention. Specifically, FIG. 2 illustrates an exemplary difference of Gaussians filter which is approximated using the infinite impulse response filters. Accordingly, the image received from prefilter processing block 120 is provided to both the upper Gaussian filter 210 and the lower Gaussian filter 220. The output of the lower Gaussian filter is subtracted from the output of the upper Gaussian filter to provide the filtered image for feature extraction block 140. It will be recognized that the response of the Gaussian filters is provided by the following formula: y(n)=x(n)+a ₁ x(n−1)+b ₁ y(n−1)+b ₂ y(n−2);  (1)

where: $\begin{matrix} {{a_{1} = {{\exp\left( \frac{\alpha^{2}}{2} \right)} - b_{1}}};} & (2) \\ {{b_{1} = {2e^{a}{\cos(\omega)}}};} & (3) \\ {{b_{2} = {- e^{2\alpha}}};} & (4) \\ {{\alpha = \frac{1}{\sigma}};} & (5) \\ {{\omega = {0.8\alpha}};} & (6) \end{matrix}$ and where y is the filtered output, x is the input, and n represents pixel address.

The size of a Gaussian filter can be set by using σ from equation 5. When performing a difference of Gaussians calculation there will be a fixed ratio between the size of the outer Gaussian filter and the inner Gaussian filter. The fixed ratio is typically between 1.4 and 2. Accordingly, once the a value is set for either the outer or the inner Gaussian filter, the size of the inner or outer Gaussian filter can be respectively set.

Since the conventional Gaussian filter employs a static value σ for the filter size, the same size will be employed when spatially filtering the entire image. However, images typically have objects which are farther away from the imaging device in the upper portions of the image, while the lower portions of the image contain objects which are closer to the imaging device. Accordingly, the present invention accounts for the different sizes of objects in an image depending upon the position of the object in the image by making the σ value, i.e., the size of the filter, vary depending upon which portion of the image is being processed by the filter. Specifically, in accordance with exemplary embodiments of the present invention, $\begin{matrix} {\alpha = \frac{1}{\sigma(m)}} & (7) \end{matrix}$ equation 5 above is replaced with equation 7 as follows:

Accordingly, the size of the filter of the present invention will vary depending upon the particular line number m being processed by the Gaussian filter. When the Gaussian filter operates on portions of the image which are closer to the top of the image, the filter will have a smaller size, and when the filter is operating on the lower portions of the image the filter will have a larger size.

FIGS. 3A and 3B respectively illustrate the response of a conventional difference of Gaussian filter and the response of the difference of Gaussian filter in accordance with exemplary embodiments of the present invention. In FIGS. 3A and 3B the vertical axis represents the frequency response of the difference of Gaussian filter, while the horizontal axis represents the line number of the image, wherein line number zero is at the top of the image and line number 600 is at the bottom of the image. As illustrated in FIG. 3A, using the conventional difference of Gaussian filter, in which the same size filter is applied across the entire image, the impulse response of the filter will have the same width regardless of which particular portion of the image is being processed by the filter. In contrast, as illustrated in FIG. 3B, the difference of Gaussian's filter of the present invention, by adjusting the size of the filter depending upon the particular portion of the image being processed, provides a wider impulse response the closer that the particular portion being processed by the filter is towards the bottom of the image. The feature extraction processing block 140 will extract features based upon the local maxima of the impulse response. Accordingly, the image data surrounding each of the three peaks illustrated in FIG. 3B will be extracted by feature extraction processing block 140.

FIG. 4 illustrates an exemplary method in accordance with the present invention. The method of FIG. 4 will be described in connection with the images of FIGS. 5-7. Initially, an image is received, such as the image illustrated in FIG. 5 (step 410). Next image range information is received (step 420). Image range information can be obtained from the imaging device or from an associated tracking file. Moreover, if the image rows are not parallel to the horizon, known techniques can be employed to rotate the image such that the captured scene is perpendicular to the imaging device. The filter size range is set based upon the image distance range and the objects to be detected (step 430). In accordance with exemplary embodiments of the present invention, the filter size range is used to adjust the σ value of the Gaussian filter.

The received image is spatially filtered with a filter whose size varies based upon the portion of the image being processed (step 440). FIG. 6 illustrates a spatially filtered version of the image of FIG. 5 filtered in accordance with exemplary embodiments of the present invention. The spatially filtered image is used to extract features by employing local maxima (step 450). After feature extraction, object discrimination (step 460) is performed to output an image with detected objects in the image, as well as an associated confidence value. FIG. 7 illustrates such an image wherein the numbers in the image correspond to the different objects detected in the image. As can be seen from FIG. 7, objects lower in the image are surrounded by larger rectangles because of the larger size filter used to detect them compared to objects higher in the image.

The present invention has been described with reference to several exemplary embodiments. However, it will be readily apparent to those skilled in the art that it is possible to embody the invention in specific forms other than those of the exemplary embodiments described above. This may be done without departing from the spirit of the invention. These exemplary embodiments are merely illustrative and should not be considered restrictive in any way. The scope of the invention is given by the appended claims, rather than the preceding description, and all variations and equivalents which fall within the range of the claims are intended to be embraced therein. 

1. A system for detecting objects in an image captured by an imaging device, the system comprising: a spatially variant filter that spatially filters the image, the spatially variant filter having a filter size range based on a distance range of distances to the image from the imaging device and objects to be detected in the image, wherein the spatially variant filter varies the filter size based on a position in the image of a portion of the image being processed; a feature extractor that extracts features from the image using the spatially filtered image; and an object discriminator that detects objects in the image using the extracted features.
 2. The system of claim 1, wherein the spatially variant filter comprises: an infinite impulse response filter.
 3. The system of claim 2, wherein the spatially variant filter comprises: a difference of Gaussians filter.
 4. The system of claim 1, wherein the spatially variant filter varies the filter size used to filter a first portion of the image to be smaller than the filter size used to filter a second portion of the image when the first portion of the image includes one or more objects that are farther from the imaging device than one or more objects included in the second portion of the image.
 5. The system of claim 1, wherein the spatially variant filter varies the filter size in accordance with a line number of the portion of the image being processed.
 6. The system of claim 5, wherein the spatially variant filter varies the filter size so that the filter size increases as the spatially variant filter filters the image from a line number at a top position of the image to a line number at a bottom position of the image.
 7. The system of claim 1, wherein the spatially variant filter provides a wider impulse response the closer the portion of the image being processed is to the imaging device.
 8. The system of claim 1, wherein the feature extractor extracts the features from the image using local maxima of the spatially filtered image.
 9. The system of claim 1, wherein the object discriminator produces an associated confidence value.
 10. The system of claim 1, comprising: a prefilter that filters the image and outputs the filtered image to the spatially variant filter.
 11. The system of claim 10, wherein the prefilter filters the image using a Sobel or Gabor operator.
 12. The system of claim 10, wherein the prefilter outputs a gradient magnitude image to the spatially variant filter.
 13. The system of claim 1, wherein the imaging device measures the distance range using a sensor device.
 14. The system of claim 1, wherein the distance range includes distances from the imaging device to a top portion of the image and from the imaging device to a bottom of the image.
 15. The system of claim 1, wherein a tracking file associated with the imaging device provides the distance range. 